/**
 * Created with JetBrains WebStorm.
 * User: rren
 * Date: 20/08/13
 * Time: 11:53
 * To change this template use File | Settings | File Templates.
 */
var url = require('url');

exports.routeToClient = function(urlRequest) {
    //console.log("request.url="+urlRequest);

    var pathname;

    if(urlRequest.length > 1){
        pathname = url.parse(urlRequest).path;
    }else{
        pathname = '/index.html';
    }

    var urlClient = '../Client'+pathname;
    //console.log("urlClient="+urlClient);

    return urlClient;
};